Fix System Settings privacy URLs in the macOS app#261
Open
ainopara wants to merge 2 commits intotheJayTea:mainfrom
Open
Fix System Settings privacy URLs in the macOS app#261ainopara wants to merge 2 commits intotheJayTea:mainfrom
ainopara wants to merge 2 commits intotheJayTea:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
This PR is specific to the macOS app under
macOS/WritingTools. Other platform implementations live in separate codebases and are not affected.The macOS app currently opens Privacy & Security settings with URLs using the
x-apple.systemsettingsscheme, for example:On macOS 26.4 (
25E246), that scheme has no registered handler, which causes macOS to show:This appears to be a regression introduced by switching from the old
x-apple.systempreferencesscheme tox-apple.systemsettings. Although Apple's settings app is now named System Settings, its bundle identifier and URL scheme still use the older System Preferences naming.Investigation
I checked the local System Settings app metadata on macOS 26.4:
/System/Applications/System Settings.apphas bundle identifiercom.apple.systempreferences.CFBundleURLTypesadvertisex-apple.systempreferences.x-apple.systemsettings.I also checked Launch Services through
NSWorkspace.urlForApplication(toOpen:):x-apple.systemsettings:com.apple.settings.PrivacySecurity.extension?Privacy_Accessibilityresolves to no handler.x-apple.systempreferences:com.apple.settings.PrivacySecurity.extension?Privacy_Accessibilityresolves to/System/Applications/System Settings.app.x-apple.systempreferences:com.apple.preference.security?Privacy_Accessibilityalso resolves to/System/Applications/System Settings.app.The Privacy & Security settings extension is still present as
com.apple.settings.PrivacySecurity.extension, and its metadata includesallowsXAppleSystemPreferencesURLScheme = 1plus legacy bundle identifiercom.apple.preference.security. So the current extension identifier is valid, but it still needs to be opened through thex-apple.systempreferencesscheme.Repository history shows the current upstream
x-apple.systemsettingsURLs were introduced in commit460f53f, replacing previously usedx-apple.systempreferences:com.apple.preference.security...URLs.Summary
x-apple.systemsettingsscheme with thex-apple.systempreferencesscheme that System Settings actually registers.Testing
NSWorkspace.urlForApplication(toOpen:).com.apple.systempreferences; registered schemex-apple.systempreferences.xcodebuild -project macOS/WritingTools.xcodeproj -scheme WritingTools -configuration Debug -destination 'platform=macOS' CODE_SIGNING_ALLOWED=NO COMPILER_INDEX_STORE_ENABLE=NO build.